package tdrest;

import javax.ws.rs.core.Response;

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;

public class HelloWorldTest {
   public static final String URI = "http://localhost:9998/";

   public static void main(String[] args) {
      final HelloWorldRequest request = new HelloWorldRequest();
      request.fullname = "Jack";

      Client client = new Client();
      WebResource resource = client.resource(URI + "hello");

      final HelloWorldResponse response =
    	  resource.type("text/xml").post(HelloWorldResponse.class, request);

      System.err.println(response);
   }
}
